﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MvvmHelper
{
    /// <summary>
    /// MVVM パターンでよく使う ICommand 実装パターン。
    /// </summary>
    public class DelegateCommand : CommandBase
    {
        public Action<object> CommandHandler { get; set; }

        public override void Execute(object parameter)
        {
            var a = this.CommandHandler;
            if (a != null)
                a(parameter);
        }
    }
}
